package com.zzyl.framework.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;

/**
 * ScriptEngine配置类
 */
@Configuration
public class ScriptEngineConfig {

    @Bean
    public ScriptEngine scriptEngine() {
        ScriptEngineManager manager = new ScriptEngineManager();
        return manager.getEngineByName("javascript");
    }
}